import request from '@/utils/request'

/**
 * 下级代理商停用
 * @param {Number} id 代理商id
 */
export function stop(id) {
  return request({
    url: '/status',
    method: 'get',
    params: { id }
  })
}

export function state(id, state) {
  const data = {
    id,
    state // 1 => 开启 2 => 停用
  }

  return request({
    url: '/upstate',
    method: 'post',
    data
  })
}
